﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zocono.WCS.Domain.EntityInfo;
using Zocono.WCS.Infrastructure.ApllicationDto.DtoUser;

namespace Zocono.WCS.Domain.UserManageDomain
{
    public interface IUserService : IDomainService
    {
        /// <summary>
        /// 查询所有用户信息
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        Task<List<UserInfoDto>> GetAllUserInfoAsync(QueryUserDto where);

        /// <summary>
        /// 查询所有功能信息
        /// </summary>
        /// <returns></returns>
        /// 服务返回Dto 
        Task<List<FunctionInfoDto>> GetFunctionInfoAsync();
        Task<List<FunctionInfoDto>> GetFunctionInfoAsync(FunctionInfoDto dto);
        /// <summary>
        ///  保存菜单
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<bool> AddFunctionInfoAsync(FunctionInfoDto dto);
        /// <summary>
        /// 更新菜单
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<bool> UpdateFunctionInfoAsync(FunctionInfoDto dto);
        /// <summary>
        /// 根据编号获取菜单信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<FunctionInfoDto> GetFunctionInfoByIdAsync(long id);

        /// <summary>
        /// 根据上级菜单ID和状态查询菜单列表
        /// </summary>
        /// <param name="pId">上级菜单ID，0=顶级单</param>
        /// <param name="status">状态1=正常</param>
        /// <returns></returns>
        Task<List<FunctionInfoDto>> GetFunctionInfoListByPidAsync(long pId, int status);
        /// <summary>
        /// 修改菜单状态
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        Task<bool> UpdateStatusByIdAsync(long Id, int status);
        Task<List<RoleInfoDto>> GetRoleInfoAsync();
        /// <summary>
        /// 根据编号获取角色信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<RoleInfoDto> GetRoleInfoByIdAsync(long id);
        /// <summary>
        /// 添加角色 
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<bool> addRoleAsync(RoleInfoDto dto);
        /// <summary>
        /// 更新角色
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<bool> UpdateRoleByIdAsync(RoleInfoDto dto);
        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> DelRoleByIdAsync(long id);
        /// <summary>
        /// 根据角色ID获取菜单信息
        /// </summary>
        /// <param name="roleID"></param>
        /// <returns></returns>

        Task<List<RoleFunctionPage>> GetRoleFunctionByRoleId(long roleID);
        /// <summary>
        /// 批量插入角色权限信息
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        Task<bool> UpdateRoleFunctionInfoByRoleIdAsync(List<RoleFunctionInfoDto> list);
    }
}
